﻿using System;
@TestRunner.Imports


namespace @Test.Namespace
{
	
	public partial class @Test.ClassName
	{


@{
 
    foreach (var property in Class.Properties.Where(p => !p.IsIndexer && p.CanRead && p.CanWrite))
    { 

        <text>
        @Tag("PropertySelfAssign")
		@TestAttribute
        public void @(Test.ClassName + "_Property_" + property.Name + "_SelfAssign") ()
		{
			var objectUnderTest = CreateObject();
			
			@property.Type.FullName defaultValue;
            try
            {
                defaultValue = objectUnderTest.@property.Name;
            }
            catch (Exception ex)
            {
                @Assert.Inconclusive("\"Could not complete test. Error reading property.\" + Environment.NewLine + ex.ToString()")
                return;
            }
            
			objectUnderTest.@property.Name = defaultValue;
			@Assert.AreEqual("defaultValue", "objectUnderTest." + @property.Name);

		}    
        </text>
    }
    
    
 }
	}
}

